<template>
	<uni-popup ref="popup" type="dialog">
		<view class="popup-content-layout">
			<view class="title">{{title}}</view>
			<text class="content">{{content}}</text>
			<view class="bottom-layout">
				<custom-button marginLeft="0" width="220rpx" bgColor="#FFFFFF" borderColor="#336DEE" color="#336DEE" text="取消" @clickBack="cancelClick"></custom-button>
				<custom-button marginLeft="0" width="220rpx" bgColor="#336DEE" color="#FFFFFF" :text="confirmText" @clickBack="sureClick"></custom-button>
			</view>
		</view>
	</uni-popup>
</template>

<script>
	export default {
		props: {
			title: {
				type: String,
				default: '确定申请体验吗？'
			},
			confirmText: {
				type: String,
				default: '确定'
			}
		},
		data() {
			return {
				content: '确定后，会有专员会联系您\n开通体验权限'
			}
		},
		///deep/生效
		options: { 
			styleIsolation: 'shared' ,
		},
		methods: {
			//显示弹窗
			show(content) {
				if(content){
					this.content = content
				}
				this.$refs.popup.open()
			},
			
			cancelClick(){
				this.$refs.popup.close()
			},
			
			sureClick(){
				this.$refs.popup.close()
				this.$emit("sureClick", {})
			}
		}
	}
</script>

<style scoped>
	/deep/ .uni-popup__wrapper {
	    width: 100% !important;
	}
	.popup-content-layout{
		width: calc(100% - 152rpx);
		margin: 0 76rpx;
		border-radius: 32rpx;
		background-color: white;
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	.title{
		width: 100%;
		text-align: center;
		padding: 32rpx 0;
		box-sizing: border-box;
		font-size: 36rpx;
		color:#2D323B;
		font-weight: 500;
		border-bottom: solid #F5F5F5 1rpx;
	}
	.content{
		width: 100%;
		font-size: 32rpx;
		color: #2D323B;
		margin-top: 32rpx;
		line-height: 46rpx;
		text-align: center;
		margin-bottom: 54rpx;
		font-weight: 500;
	}
	.bottom-layout{
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		padding: 0 60rpx;
		box-sizing: border-box;
		margin-bottom: 32rpx;
	}
</style>
